home *** CD-ROM | disk | FTP | other *** search
- Path: news.luc.edu!user
- From: VArase@varase.it.luc.edu (Verne Arase)
- Newsgroups: comp.lang.pl1,comp.lang.c
- Subject: Re: PL/I and C
- Date: Fri, 23 Feb 1996 17:34:11 -0600
- Organization: LUMC
- Message-ID: <AD53AB1396681879FA@mcdialb10.it.luc.edu>
- References: <4gh5ru$eng@goanna.cs.rmit.EDU.AU> <312CCEB2.4AB7@corp.dialog.com> <AD536AAB9668B76CD@mcdialb09.it.luc.edu> <312E363C.3CDE@corp.dialog.com>
- NNTP-Posting-Host: 147.126.240.126
-
- In article <312E363C.3CDE@corp.dialog.com>,
- Paul Gorodyansky <paul_gorodyansky@corp.dialog.com> wrote:
-
- >Sorry, you missed my point. If I want to have SEVERAL masks for THE SAME
- >area of memory, that is have SEVERAL DIFFERENT Structures overlaid my
- >buffer, C has a feature for this - a Union, where I can have members of
- >different Nature overlaid the same area of memory, BUT, unlike PL/I, an
- >Array CAN NOT be a member of a Union. But, it is always a case in our
- >Text Processing - I want to look at my source record's buffer at some
-
- Huh? Why not? I know of no rule which would preclude having an array in a
- union.
-
- ... and BTW, you don't need to use a union; you can simply have several
- pointers, each containing the same address. Just coerce them with a cast.
-
- foo *x;
- bar *y;
-
- y=(bar *) x;
-
- ---
- The above are my own opinions, and not those of my employer.
-